package com.zyf.service;


import com.zyf.mapper.NewsMapper;
import com.zyf.pojo.News;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class NewsServiceImpl implements NewsService {

    @Resource
    NewsMapper mapper;

    @Override
    public List<News> findAll() {
        return mapper.findAll();
    }

    @Override
    public int add(News news) {
        return mapper.add(news);
    }
}
